package com.etc.singleton;


/**
 * 单例模式3 ->懒汉
 */
public class Singleton3 {
	private static Singleton3 instance;
	private Singleton3() {}
	public static Singleton3 getInstance() {
		if (instance == null) {
			//需要的时候再创建,此时没有加入线程同步的处理
			instance = new Singleton3();
		}
		return instance;
	}
}
